Disabling Movies and Tracks
The Movie Toolbox services only movies and tracks that are active. This section describes functions that allow your application to enable and disable tracks and movies.
You can use the
SetMovieActive
function to activate and deactivate a movie. Use the
GetMovieActive
function to determine whether a movie is active.
Similarly, your application can use the
SetTrackEnabled
function to enable and disable a track. Use the
GetTrackEnabled
function to determine whether a track is enabled. The Movie Toolbox also allows you to assign alternate tracks based on language or quality criteria. Functions that work with alternate tracks are discussed in
"Working With Alternate Tracks,"
.
SetMovieActive
The
SetMovieActive
function allows your application to activate and deactivate a movie.
pascal void SetMovieActive (Movie theMovie, Boolean active);
-
theMovie
-
Specifies the movie for this operation. Your application obtains this movie identifier from such functions as
NewMovie
,
NewMovieFromFile
, and
NewMovieFromHandle
(described on
NewMovie
,
NewMovieFromFile
, and
NewMovieFromHandle
, respectively).
-
active
-
Activates or deactivates the movie. Set this parameter to
true
to activate the movie; set this parameter to
false
to deactivate the movie.
SPECIAL CONSIDERATIONS
The Movie Toolbox services only active movies. When you deactivate a movie, the Movie Toolbox may release system resources required by the movie, such as sound hardware, open files, and allocated memory. Unless you set the
newMovieActive
flag when creating a movie, you should call
SetMovieActive
before playing a movie.
ERROR CODES
invalidMovie
|
-2010
|
This movie is corrupted or invalid
|
SEE ALSO
You can determine whether a movie is active by calling the
GetMovieActive
function, which is described in the next section.
GetMovieActive
The
GetMovieActive
function allows your application to determine whether a movie is currently active. The Movie Toolbox services only active movies.
pascal Boolean GetMovieActive (Movie theMovie);
-
theMovie
-
Specifies the movie for this operation. Your application obtains this movie identifier from such functions as
NewMovie
,
NewMovieFromFile
, and
NewMovieFromHandle
(described on
NewMovie
,
NewMovieFromFile
, and
NewMovieFromHandle
, respectively).
DESCRIPTION
The
GetMovieActive
function returns a Boolean value. The function sets this value to
true
if the movie is active and
false
if the movie is not active.
ERROR CODES
invalidMovie
|
-2010
|
This movie is corrupted or invalid
|
SEE ALSO
You can make a movie active by calling the
SetMovieActive
function, which is described in the previous section.
SetTrackEnabled
The
SetTrackEnabled
function allows your application to enable and disable a track. The Movie Toolbox services only enabled tracks.
pascal void SetTrackEnabled (Track theTrack, Boolean isEnabled);
-
theTrack
-
Specifies the track for this operation. Your application obtains this track identifier from such Movie Toolbox functions as
NewMovieTrack
and
GetMovieTrack
(described on
NewMovieTrack
and
GetMovieTrack
, respectively).
-
isEnabled
-
Enables or disables the track. Set this parameter to
true
to enable the track. Set this parameter to
false
to disable the track.
SPECIAL CONSIDERATIONS
When you disable a track, the Movie Toolbox may release system resources that are used by the track, including allocated memory.
ERROR CODES
invalidTrack
|
-2009
|
This track is corrupted or invalid
|
SEE ALSO
You can determine whether a track is enabled by calling the
GetTrackEnabled
function, which is described in the next section.
GetTrackEnabled
The
GetTrackEnabled
function allows your application to determine whether a track is currently enabled. The Movie Toolbox services only enabled tracks.
pascal Boolean GetTrackEnabled (Track theTrack);
-
theTrack
-
Specifies the track for this operation. Your application obtains this track identifier from such Movie Toolbox functions as
NewMovieTrack
and
GetMovieTrack
(described on
NewMovieTrack
and
GetMovieTrack
, respectively).
DESCRIPTION
The
GetTrackEnabled
function returns a Boolean value. The function sets this value to
true
if the track is enabled and
false
if the track is disabled.
ERROR CODES
invalidTrack
|
-2009
|
This track is corrupted or invalid
|
SEE ALSO
You can enable a track by calling the
SetTrackEnabled
function, which is described in the previous section.
© 1997 Apple Computer, Inc.Previous | Chapter Top | Chapter Contents | Next